UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7Co+Qg/3rD9AxIrXfk13crAhoJakfPk1rnFXJ/hMAqY='
WHERE
key_id = '19a7246d7b129008431c50b5e5ecb4d65c7b0384901e46424f12c794d5dcbb6b'
AND (
token = '7Co+Qg/3rD9AxIrXfk13crAhoJakfPk1rnFXJ/hMAqY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)