UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hQo2zTwlreBO/dAYrYdEJ5JCKr0gTtQbXgR1leIzHGU='
WHERE
key_id = '2321a5e8906c8621bc19340f5e6d7abfdbcb0b5318d4731034f473ac45c513f7'
AND (
token = 'hQo2zTwlreBO/dAYrYdEJ5JCKr0gTtQbXgR1leIzHGU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)