UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q1oaXZzWK5ZcKq2eto+zYJEcQSn4s9TCc7NuDjqY5ho='
WHERE
key_id = '2c2752a5bfac0f632675d5b0da19e6b3da26896e3cf01bd1e1eb4db700c93b48'
AND (
token = 'q1oaXZzWK5ZcKq2eto+zYJEcQSn4s9TCc7NuDjqY5ho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)