UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3N/XgC+v18rMMdWO0DouJFQZxv0yPrHMpvSPR1pVNoc=' 
WHERE 
  key_id = 'eb794590b96661a88523e204d1f4275d5e301dcba9c95401694288c13af7e1cd' 
  AND (
    token = '3N/XgC+v18rMMdWO0DouJFQZxv0yPrHMpvSPR1pVNoc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030