UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7QPOan3LBtp7dL7WQC5Mv49AuWRMcGRuvw/SvMLIKtU='
WHERE
key_id = '8ac09b279c46af994839df2fe04970e3ca0e1bfad0f011ed3e1eb6fac2f1ac53'
AND (
token = '7QPOan3LBtp7dL7WQC5Mv49AuWRMcGRuvw/SvMLIKtU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)