UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PONrx4OgsnAnlaaOPqeMVnWNde190kI/8y3BLhalie0='
WHERE
key_id = '9358f4ccf7f9b97bd513f2430f5df8e06f2bd244651f1f1fc36dd214d68dc358'
AND (
token = 'PONrx4OgsnAnlaaOPqeMVnWNde190kI/8y3BLhalie0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)