UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eLnmUMKw/Y2Y+7PJvybq5BYkjwoyvx9wQwR/nReQPQk='
WHERE
key_id = '816841c2ce341e6bb2fa341fff2015728b43d05ea37a0176b594332670b7f020'
AND (
token = 'eLnmUMKw/Y2Y+7PJvybq5BYkjwoyvx9wQwR/nReQPQk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)