UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AcdMeUgRo8V8eFnLLmli+RK8+7MEXsXNHWeC0hozxhY=' 
WHERE 
  key_id = '355741980604a64b75dc40c7d1885ee1cdf53bfe6d87895d37faab79c79e7468' 
  AND (
    token = 'AcdMeUgRo8V8eFnLLmli+RK8+7MEXsXNHWeC0hozxhY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028