UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/kL4eZoGROdaprjg+Bd2N8q633LSRxYKzZjzT8fi7Ko='
WHERE
key_id = '9e6b5c757e3b871f3f5eaf134083174e528a02e9d1e7bef272d9586040e9ead2'
AND (
token = '/kL4eZoGROdaprjg+Bd2N8q633LSRxYKzZjzT8fi7Ko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)