UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UJvq/Ad/u5qgqlXS4+onTQx2AmWl4PUO98eeP5xQM5s='
WHERE
key_id = '6cee400995cf386e85e923bc5625f83c3af0594a54f135fcf47e6eaae0f08b23'
AND (
token = 'UJvq/Ad/u5qgqlXS4+onTQx2AmWl4PUO98eeP5xQM5s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)