UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9Mq3/4kXMdBW3FNQKuhgo4BWlMWX+pG7cpm1TVo5NNs='
WHERE
key_id = 'd89c57eba0bf80675039af79d8bf049acc26d4f8531abd26502a32eeb0a21c83'
AND (
token = '9Mq3/4kXMdBW3FNQKuhgo4BWlMWX+pG7cpm1TVo5NNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)