UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7NvDXV/jPR3R9lixNRucyUw2QAUuqWu4/dd6LOF7Hjg=' 
WHERE 
  key_id = 'd06705dc2e47a403285c6a72f92b9e185514688a0a0b6e8a4f8bfb9c828119ab' 
  AND (
    token = '7NvDXV/jPR3R9lixNRucyUw2QAUuqWu4/dd6LOF7Hjg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043