UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/5cqWxutqdxny0djxqKhKE3e6Qkf/qQV4ze1eQznIpU=' 
WHERE 
  key_id = '9cc9a6aec79f8eab247e918e583ce41fb4f7d7fb94ce16eb6528bbd12f6d4c58' 
  AND (
    token = '/5cqWxutqdxny0djxqKhKE3e6Qkf/qQV4ze1eQznIpU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054