UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uG4huS3P9WP+Qx/YL4dWtKrr6XlfTci4Dx86EN1YsUY='
WHERE
key_id = '1b7d5f78a34143cdb9931ed1d4d016dff6916ae409ab6db4f84b87684114a169'
AND (
token = 'uG4huS3P9WP+Qx/YL4dWtKrr6XlfTci4Dx86EN1YsUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)