UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lklpQkBH2VVAIbDF3xy8UmD9R439XsMmq6P7qsGvuJY='
WHERE
key_id = '11b8c7abd256afbccabbc42fd46d15c352d90814a6626d4ae82daac0f3ea70f7'
AND (
token = 'lklpQkBH2VVAIbDF3xy8UmD9R439XsMmq6P7qsGvuJY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)