UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '30jFvLfLejubODrlW3GoD9LGo2UDfRcdNPwPaXizn+4='
WHERE
key_id = '3f61471491c160d2e5fc2e1abc428dd10d06f4a0d1b7de934eb93fd0fae20b22'
AND (
token = '30jFvLfLejubODrlW3GoD9LGo2UDfRcdNPwPaXizn+4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)