UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WoSekgHXWQQzQY6wDwE6BKI5Mf0ReCpH4g0eMFya99E=' 
WHERE 
  key_id = '741ad1aa5bc87ad71b9de4277d080f608880e79bc2ae9f831a1112d9eeb26474' 
  AND (
    token = 'WoSekgHXWQQzQY6wDwE6BKI5Mf0ReCpH4g0eMFya99E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024