UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wDlUKO2yjgzvX6jeyPHIAE2azIsijHBXVUJxk/dfsTw=' 
WHERE 
  key_id = '5672d14e66a9f7ff939cfc0aed1122ca6ae2ff3aa848370f13da6db21f704912' 
  AND (
    token = 'wDlUKO2yjgzvX6jeyPHIAE2azIsijHBXVUJxk/dfsTw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031