UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+eD5+72QoPAafvXepm343V9O9ltn3MpfVLBqzBs9ge4='
WHERE
key_id = 'eeac48ae64a840dad43d65d1da5ccb0f580f936feef2b09b53ddbfddc5251b9b'
AND (
token = '+eD5+72QoPAafvXepm343V9O9ltn3MpfVLBqzBs9ge4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)