UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/02jfZIf8b7bH6m27cBzvcbaRt+v+4oV2nQnZcFgBWc='
WHERE
key_id = '18d06941f39487ba1e4f3b970a1073c4235aafc321e90cde15158b185f9c6b46'
AND (
token = '/02jfZIf8b7bH6m27cBzvcbaRt+v+4oV2nQnZcFgBWc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)