UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jcljqGFr2Nx0etWcd1KUGFLaMH8qL4Qa04IAgIt54vs='
WHERE
key_id = '2134b7f69009201c409a1d5300920f14f5d77ff5e20459ab46e24656e12da78f'
AND (
token = 'jcljqGFr2Nx0etWcd1KUGFLaMH8qL4Qa04IAgIt54vs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)