UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5DH//TQUfnNInGGEu2+2dx3e8x4AMWklCy9YHTwDEDk=' 
WHERE 
  key_id = '1f878ec45c44ba78bb7f26b18fc10b538f21a97c676898404ade1b365e01e3dd' 
  AND (
    token = '5DH//TQUfnNInGGEu2+2dx3e8x4AMWklCy9YHTwDEDk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042