UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '70A+4+PVCvM3Bf5/hZEtZvmvL/EXXbTIAUT4i7SEMHs='
WHERE
key_id = '94b75ecda831aed4bbba090ca978f20dc2c22c8f781911475c33a4731537ea63'
AND (
token = '70A+4+PVCvM3Bf5/hZEtZvmvL/EXXbTIAUT4i7SEMHs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)