UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+MFL+tHLA14OBDnRQR+EEdFoOyhK2MVKlFEPMMsMKGs='
WHERE
key_id = '1f7ae9b8bad7b462fe3c4fc6aae4542e69332086282c6f4d5fff74f1797508ce'
AND (
token = '+MFL+tHLA14OBDnRQR+EEdFoOyhK2MVKlFEPMMsMKGs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)