UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '55gHictfXhYWoOaPOsbrFgKUCD5G9J2G4+9Xr4mJcOQ='
WHERE
key_id = '6f4b7b361bd96aed17c105fe2189c30e0fb48eb6ce27503ee28aa3145ec9921c'
AND (
token = '55gHictfXhYWoOaPOsbrFgKUCD5G9J2G4+9Xr4mJcOQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)