UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lxmMlntk10FgGo9AjflP0vc9okvowv93gBfEODxIY5g=' 
WHERE 
  key_id = 'ab951f2d8dc4a8157ff5a6e1e7af65ef71a5000be475b74d44b7f35ae9974d72' 
  AND (
    token = 'lxmMlntk10FgGo9AjflP0vc9okvowv93gBfEODxIY5g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029