UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CNojzQjw+fnY6/nvwDe6NS2ssXVK6jFEl8iWDMAuU5o=' 
WHERE 
  key_id = '72e2d260289bee141ff3a5abec5e8198295e76bd92b792a3ac0cb5175eca5b62' 
  AND (
    token = 'CNojzQjw+fnY6/nvwDe6NS2ssXVK6jFEl8iWDMAuU5o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00065