UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IPnjn0o/aceeRelg8xKpLfsVe9U1H6YmsInTpWrxaD0=' 
WHERE 
  key_id = '698b14d92d69a438f4acbaadb5cdf78bca7e4b1e5d3defb823fd63b8e8d0dfe0' 
  AND (
    token = 'IPnjn0o/aceeRelg8xKpLfsVe9U1H6YmsInTpWrxaD0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020