UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dsaGg5+vavlMui9lBE/5DoF86fBcfLXIq5h2oZx/8Rc=' 
WHERE 
  key_id = 'e03397b7e36acccbe257409acde209adf8d35da256236e62f0810f7cfc83db6d' 
  AND (
    token = 'dsaGg5+vavlMui9lBE/5DoF86fBcfLXIq5h2oZx/8Rc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044