UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h4CMaXFLSyTNOVtry9caXYnU8GShQCm/dFeGoGmwfp8='
WHERE
key_id = '441708ab12b0c2252eb157e794abe3863b9a83ad06114d2a6e50260142a4e50a'
AND (
token = 'h4CMaXFLSyTNOVtry9caXYnU8GShQCm/dFeGoGmwfp8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)