UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uZt5Phlx3+X0VMHsZIfeL0iF/RhRVcl/XuPWJn2N/NM='
WHERE
key_id = '14dfa39c3fcf3712420e5add56c48aa2494cbe56e1a577dcf7fbc3857a81aea7'
AND (
token = 'uZt5Phlx3+X0VMHsZIfeL0iF/RhRVcl/XuPWJn2N/NM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)