UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LmjW6TkgyDjG5wQ1JGX5a30i4nDxmcB8JOo6Ec9LzgQ=' 
WHERE 
  key_id = '37f3fe77d880a725441ca5be214ffbbb38f9f65e8e4dd79c6475819cc5f6a0ae' 
  AND (
    token = 'LmjW6TkgyDjG5wQ1JGX5a30i4nDxmcB8JOo6Ec9LzgQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024