UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ckn5Xr5eB2Y83l32ytNCQ/EjqOUeinGMphW6W+JWClQ='
WHERE
key_id = 'ee3578cd5c9f8940fd633474aad9c0f4b2fc4ec0bb0ce8683080758e6ce2e2a6'
AND (
token = 'ckn5Xr5eB2Y83l32ytNCQ/EjqOUeinGMphW6W+JWClQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)