UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nWTC4ha3p+FmuCRtr33HjmB2ykY26QMhzxlG05cPmaA='
WHERE
key_id = '0dca71d6b14a1a97b2566dcaf9bf77eed6a85c76ae24a5ee454c15108271fac2'
AND (
token = 'nWTC4ha3p+FmuCRtr33HjmB2ykY26QMhzxlG05cPmaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)