UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PQvAgo/Dl1AHUVpLv5FwvEwf/Ufehry7L9XMggBJCro='
WHERE
key_id = '111600154f2a806d8aae643776f4b88ef6d1209719bf6be07f055851bd8eefea'
AND (
token = 'PQvAgo/Dl1AHUVpLv5FwvEwf/Ufehry7L9XMggBJCro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)