UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LfAA+HiUtdxkqwlAALRZ+JQtJA8KQ+QFzOPaNlcHsEw='
WHERE
key_id = 'ca8a2842e042b87dbba30f5e7a26ec939b7ee75b4a0e76dcb8fd65e7743c17e6'
AND (
token = 'LfAA+HiUtdxkqwlAALRZ+JQtJA8KQ+QFzOPaNlcHsEw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)