UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EB5aGEDzrY1sGSWwj84dLSZT69XDDsJ9DeTKuUUzbdo=' 
WHERE 
  key_id = '5b20eacc61ec74a0884bffb18b41088addfbca8f6e3294d9a2409221ed014978' 
  AND (
    token = 'EB5aGEDzrY1sGSWwj84dLSZT69XDDsJ9DeTKuUUzbdo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014