UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4iYsmKIJw9r3LkwazRoK2SOLzHYzR6oZacTBfnXAGus='
WHERE
key_id = '43e2756a0326078084745a5b3d3b969c164facf8cf93d2263816d53455a20740'
AND (
token = '4iYsmKIJw9r3LkwazRoK2SOLzHYzR6oZacTBfnXAGus='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)