UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jJ8PeRV5yAG8l/p+8y+brzhfBE+Huyu6bgCRJdR1P1k=' 
WHERE 
  key_id = '8f046fe434ce698abf27090bf3562aa9d0214a795ad3cc9ad48b2e6a0ae42e97' 
  AND (
    token = 'jJ8PeRV5yAG8l/p+8y+brzhfBE+Huyu6bgCRJdR1P1k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029