UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'n0klY/+CH9kCU9s8MVuJOGIHNsFXbGU0LhbbGwtejww='
WHERE
key_id = '7909ccf71d94ceb1a03b8466471705ae78b8c6e1b0fddb6f59637854a903c288'
AND (
token = 'n0klY/+CH9kCU9s8MVuJOGIHNsFXbGU0LhbbGwtejww='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)