UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '37oiMICfYppXiBuy5emIuD8SDsifEoM0M3h3yq9GgxQ=' 
WHERE 
  key_id = '056e9b53aac67cb2a5a7ca271b59c61ad47fe10c799b2e75182bf3e650419bf0' 
  AND (
    token = '37oiMICfYppXiBuy5emIuD8SDsifEoM0M3h3yq9GgxQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017