UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fUXilhp4Ft/YxZ/FqaUfc2UM0JwwEHjgKcEu7Qnd7sQ='
WHERE
key_id = '889b8278109d1fef2e94bfb199b7c042f0bbd74934f5b440b2492dadab62f1f3'
AND (
token = 'fUXilhp4Ft/YxZ/FqaUfc2UM0JwwEHjgKcEu7Qnd7sQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)